
function chkAjaBrowser()
{
var a,ua = navigator.userAgent;
this.bw= { 
safari    : ((a=ua.split('AppleWebKit/')[1])?a.split('(')[0]:0)>=124 ,
konqueror : ((a=ua.split('Konqueror/')[1])?a.split(';')[0]:0)>=3.3 ,
mozes     : ((a=ua.split('Gecko/')[1])?a.split(" ")[0]:0) >= 20011128 ,
opera     : (!!window.opera) && ((typeof XMLHttpRequest)=='function') ,
msie      : (!!window.ActiveXObject)?(!!createHttpRequest()):false 
}
return (this.bw.safari||this.bw.konqueror||this.bw.mozes||this.bw.opera||this.bw.msie)
}

function createHttpRequest()
{
if(window.ActiveXObject){

try {
	return new ActiveXObject("Msxml2.XMLHTTP") ;
} catch (e) {
	try {
		return new ActiveXObject("Microsoft.XMLHTTP") ;
	} catch (e2) {
		return null ;
	}
}
} else if(window.XMLHttpRequest){
return new XMLHttpRequest() ;
} else {
return null ;
}
}

function sendRequest(callback,data,method,url,async,sload,user,password)
{
var oj = createHttpRequest();
if( oj == null ) return null;

var sload = (!!sendRequest.arguments[5])?sload:false;
if(sload || method.toUpperCase() == 'GET')url += "?";
if(sload)url=url+"t="+(new Date()).getTime();


var bwoj = new chkAjaBrowser();
var opera	  = bwoj.bw.opera;
var safari	  = bwoj.bw.safari;
var konqueror = bwoj.bw.konqueror;
var mozes	  = bwoj.bw.mozes ;

if(opera || safari || mozes){
oj.onload = function () { callback(oj); }
} else {
oj.onreadystatechange =function () 
{
	if ( oj.readyState == 4 ){
		if(oj.status ==200){
			callback(oj);
		}else{
			printState('['+oj.readyState+']'+oj.status+':'+oj.statusText+' "'+url+'"'); 
		}
	}
}
}

data = uriEncode(data)
if(method.toUpperCase() == 'GET') {
url += data
}

oj.open(method,url,async,user,password);

setEncHeader(oj)

oj.send(data);

function setEncHeader(oj){

var contentTypeUrlenc = 'application/x-www-form-urlencoded; charset=UTF-8';
if(!window.opera){
	oj.setRequestHeader('Content-Type',contentTypeUrlenc);
} else {
	if((typeof oj.setRequestHeader) == 'function')
		oj.setRequestHeader('Content-Type',contentTypeUrlenc);
}	
return oj
}

function uriEncode(data){

if(data!=""){
	var encdata = '';
	var datas = data.split('&');
	for(i=1;i<datas.length;i++)
	{
		var dataq = datas[i].split('=');
		encdata += '&'+encodeURIComponent(dataq[0])+'='+encodeURIComponent(dataq[1]);
	}
} else {
	encdata = "";
}
return encdata;
}


return oj
}


function parseBrake(tx){
var parag = tx.split('\n');
var rep = '';
for(var i =0; i<parag.length; i++){
if(i != parag.length-1){
rep += parag[i] + '<br>';
}
else{
rep += parag[i];
}
}
return rep;
}

var chVerArr = new Array();
chVerArr[0] = '（';
chVerArr[1] = '︵';
chVerArr[2] = '）';
chVerArr[3] = '︶';
chVerArr[4] = '｛';
chVerArr[5] = '︷';
chVerArr[6] = '｝';
chVerArr[7] = '︸';
chVerArr[8] = '「';
chVerArr[9] = '﹁';
chVerArr[10] = '」';
chVerArr[11] = '﹂';
chVerArr[12] = '『';
chVerArr[13] = '﹃';
chVerArr[14] = '』';
chVerArr[15] = '﹄';
chVerArr[18] = 'ー';
chVerArr[19] = '︱';
chVerArr[20] = '…';
chVerArr[21] = '︰';
chVerArr[22] = '(';
chVerArr[23] = '︵';
chVerArr[24] = ')';
chVerArr[25] = '︶';
chVerArr[26] = '{';
chVerArr[27] = '︷';
chVerArr[28] = '}';
chVerArr[29] = '︸';
chVerArr[30] = '[';
chVerArr[31] = '︵';
chVerArr[32] = ']';
chVerArr[33] = '︶';
chVerArr[34] = '【';
chVerArr[35] = '︵';
chVerArr[36] = '】';
chVerArr[37] = '︶';


function pareseChaver(x){
var temp = '';
for(var i =0; i<chVerArr.length; i++){
if(x == chVerArr[i]){
  temp = chVerArr[i+1];
  break;
}
}
if(temp =='') temp=x;
return temp;
}



var chVerArrDec = new Array();
chVerArrDec[0] = '〇';
chVerArrDec[1] = '一';
chVerArrDec[2] = '二';
chVerArrDec[3] = '三';
chVerArrDec[4] = '四';
chVerArrDec[5] = '五';
chVerArrDec[6] = '六';
chVerArrDec[7] = '七';
chVerArrDec[8] = '八';
chVerArrDec[9] = '九';
chVerArrDec[10] = '十';


function pareseChaverDec(x){

var temp = '';
for(i=0; i<x.length; i++){
if(eval(x.charAt(i))>=0 && eval(x.charAt(i)) <=10){
temp += chVerArrDec[eval(x.charAt(i))];
}
}
return temp;
}

var pchVerArr = new Array();										//add 061006 begin
pchVerArr[0] = '、';
pchVerArr[1] = '。';
pchVerArr[2] = '（';
pchVerArr[3] = '）';
pchVerArr[4] = '｛';
pchVerArr[5] = '｝';
pchVerArr[6] = '「';
pchVerArr[7] = '」';
pchVerArr[8] = '『';
pchVerArr[9] = '』';
pchVerArr[10] = 'ー';
pchVerArr[11] = '…';
pchVerArr[12] = '(';
pchVerArr[13] = ')';
pchVerArr[14] = '{';
pchVerArr[15] = '}';
pchVerArr[16] = '[';
pchVerArr[17] = ']';
pchVerArr[18] = '【';
pchVerArr[19] = '】';
	function prohibiCh(str){
		for(var i=0; i<pchVerArr.length; i++){
			if(str==pchVerArr[i]){
					return true;
					break;
			}
		}
		return false;
	}	